//
//  PersonView.swift
//  vmes
//
//  Created by 志鹏 翟 on 2021/11/19.
//

import Foundation
import UIKit
class PersonView : UIView{
    
    override init(frame: CGRect) {
        super.init(frame:frame)
        commonInit()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
        commonInit()
    }
    
    private func commonInit(){
        let nameLb=UILabel()
        nameLb.text="翟志鹏"
        nameLb.textColor = .white
        self.addSubview(nameLb)
        let roleLb=UILabel()
        roleLb.text="机加工车间员工"
        self.addSubview(roleLb)
        let exitBtn=UILabel()
        exitBtn.text="退出"
        self.addSubview(exitBtn)
        let companyLb=UILabel()
        companyLb.text="苏州测绘地理信息有限公司"
        companyLb.textColor = .white
        companyLb.font=companyLb.font.withSize(15)
        self.addSubview(companyLb)
        nameLb.snp.makeConstraints { make in
            make.left.equalToSuperview().offset(10)
            make.top.equalToSuperview().offset(10)
        }
        companyLb.snp.makeConstraints { make in
            make.top.equalTo(nameLb.snp.bottom).offset(10)
            make.left.equalToSuperview().offset(10)
        }
        roleLb.textColor = .white
        roleLb.snp.makeConstraints { make in
            make.left.equalTo(nameLb.snp.right).offset(10)
            make.bottom.equalTo(nameLb.snp.bottom)
        }
        exitBtn.textColor = .white
        exitBtn.font=exitBtn.font.withSize(15)
        exitBtn.alpha=0.5
        exitBtn.snp.makeConstraints { make in
            make.top.equalToSuperview().offset(10)
            make.right.equalToSuperview().offset(-10)
        }
    }
}
